﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

/// <summary>
/// The purpose of this user control is to handle all of the
/// login security for the website.
/// </summary>
public partial class App_Common_UserControls_Login : System.Web.UI.UserControl
{

    protected void lnSiteWorx_LoggedIn(object sender, EventArgs e)
    {
        if (Request.UrlReferrer.ToString().Contains("/CartDetails.aspx") ||
            Request.UrlReferrer.ToString().Contains("/ChangePassword.aspx") ||
            Request.UrlReferrer.ToString().Contains("/Checkout.aspx") ||
            Request.UrlReferrer.ToString().Contains("/ContentEditor.aspx") ||
            Request.UrlReferrer.ToString().Contains("/FullSizeImage.aspx") ||
            Request.UrlReferrer.ToString().Contains("/MyProfile.aspx") ||
            Request.UrlReferrer.ToString().Contains("/OrderConfirmation.aspx") ||
            Request.UrlReferrer.ToString().Contains("/RecoverPassword.aspx") ||
            Request.UrlReferrer.ToString().Contains("/Registration.aspx"))
                Response.Redirect("Default.aspx", true);
    }
}
